Player = new Class({
	
	_type : "Player",
	
	Implements : Options,
	
	options : {
		'id' : null,
		'name' : null,
		'team' : null,
	},
	
	initialize : function(params){
		this.setOptions(params);
	},
	
	getId : function(){
		return this.options.id;
	},
	
	getName : function(){
		return this.options.name;
	}
});

/********* Player Static Methods *********/

/**
 * Get Player By Id
 * @return Player
 */
Player.getPlayerById = function(id){
	var g = GameEng.getInstance();
	for(var n=0;n<g.players.length;n++){
		if(g.players[n].getId()==id) return g.players[n];
	}
}

/**
 * Get Player By Name
 * @return Player
 */
Player.getPlayerByName = function(name){
	var g = GameEng.getInstance();
	name += '';
	name = name.toLowerCase();
	for(var n=0;n<g.players.length;n++){
		if((g.players[n].getName()).toLowerCase()==name) return g.players[n];
	}
}